const router = require('koa-router')()
// const ArticleController = require('../controllers/user/article')
// const AuthController = require('../controllers/auth')
const UserInfoController = require('../controllers/userInfo')


router.prefix('/users')

/**
 * 文章接口
 */
// //创建文章
// router.post('/article/create',ArticleController.create);

// //获取文章详情
// router.get('/article/:id',ArticleController.detail)

// 获取角色列表
router.get('/roles-list', UserInfoController.getRolesList)
// 获取用户列表
router.get('/user-list', UserInfoController.getUserList)
// 获取用户信息
router.get('/user-info', UserInfoController.getUserInfo)
// 用户信息保存
router.post('/save', UserInfoController.save)
// 用户头像上传
router.post('/upload-avatar', UserInfoController.uploadAvatar)

module.exports = router
